package com.szyt.basicframe.pojo.request.usermanagement;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.szyt.basicframe.annotation.UserNameUnique;
import com.szyt.basicframe.common.OperationTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

@Data
@ApiModel("编辑用户信息表单")
public class UpdateUserRequest implements Serializable {
    @Serial
    private static final long serialVersionUID = -9116374461163888811L;

    @ApiModelProperty("用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("用户名")
//    @UserNameUnique(type = OperationTypeEnum.UPDATE, message = "用户名已存在")
    private String userName;

    @ApiModelProperty("用户昵称")
    private String nickName;

    @ApiModelProperty("性别，0=男，1=女，2=其他")
    private String sex;

    @ApiModelProperty("电话号码")
    private String tel;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("是否锁定，true=锁定，false=未锁定")
    private Boolean locked;
}
